﻿Public Class StubRolesRepository
  Implements Interfaces.IRolesRepository

  ''' <summary>
  ''' Using the default constructor will load the roles, 'test', 'test2' and 'role3' with three, two and no users respectively.
  ''' Useful for testing...
  ''' </summary>
  Public Sub New()
    Call _lRoles.Add(New Role("test", "aaa,bbb,ccc"))
    Call _lRoles.Add(New Role("test2", "aaa"))
    Call _lRoles.Add(New Role("role3", ""))
  End Sub

  Public Sub New(ByVal Roles As List(Of Role))
    _lRoles = Roles
  End Sub

  Private _lRoles As New List(Of Role)
  Public ReadOnly Property Roles() As System.Collections.Generic.List(Of Role) Implements Interfaces.IRolesRepository.Roles
    Get
      Return _lRoles
    End Get
  End Property

  Public Sub Save() Implements Interfaces.IRolesRepository.Save
    ' Do nothing ... it's a stub! :)
  End Sub
End Class
